import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
      home: Scaffold(
    appBar: AppBar(
      title: const Text("你好flutter"),
    ),
    body: const MyApp(),
  )));
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: 200,
      child: ListView(
        scrollDirection: Axis.horizontal,
        children: [
          Container(
            width: 200,
            decoration: const BoxDecoration(color: Colors.red),
          ),
          Container(
            width: 200,
            decoration: const BoxDecoration(color: Colors.black),
          ),
          Container(
            width: 200,
            decoration: const BoxDecoration(color: Colors.green),
          ),
          Container(
            width: 200,
            decoration: const BoxDecoration(color: Colors.yellow),
          ),
        ],
      ),
    );
  }
}
